<?php

namespace app\admin\model\pt;

use think\Model;


class AgencyRemit extends Model
{





    // 表名
    protected $name = 'pt_agency_remit';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'remit_type_text'
    ];

    function getRemitTypeTextAttr($value, $data)
    {
        $value = $value ? $value : $data['remit_type'];
        $list = $this->getRemitTypeList();
        return $list[$value] ?? '';
    }

    function getRemitTypeList()
    {
        return ['1' => '银行转账', '2' => '微信转账', '3' => '支付宝转账', '4' => '现金'];
    }
    //订单类型
    function getOrderTypeList()
    {
        return ['1' => '职称', '2' => '继续教育', '3' => '专利', '4' => '软著', '5' => '科研', '6' => '论文', '7' => '学历'];
    }

    function remitOrders()
    {
        return $this->hasMany('RemitOrder', 'remit_id', 'id');
    }










}
